Optimal. Leaf size=116 \[ \frac{\left (a^2+2 b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac{a \left (a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}+\frac{\left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^5 d}-\frac{a \tan ^3(c+d x)}{3 b^2 d}+\frac{\tan ^4(c+d x)}{4 b d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.101835, antiderivative size = 116, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 21, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.095, Rules used = {3506, 697} \[ \frac{\left (a^2+2 b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac{a \left (a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}+\frac{\left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^5 d}-\frac{a \tan ^3(c+d x)}{3 b^2 d}+\frac{\tan ^4(c+d x)}{4 b d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3506
Rule 697
Rubi steps
\begin{align*} \int \frac{\sec ^6(c+d x)}{a+b \tan (c+d x)} \, dx &=\frac{\operatorname{Subst}\left (\int \frac{\left (1+\frac{x^2}{b^2}\right )^2}{a+x} \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\operatorname{Subst}\left (\int \left (\frac{a \left (-a^2-2 b^2\right )}{b^4}+\frac{\left (a^2+2 b^2\right ) x}{b^4}-\frac{a x^2}{b^4}+\frac{x^3}{b^4}+\frac{\left (a^2+b^2\right )^2}{b^4 (a+x)}\right ) \, dx,x,b \tan (c+d x)\right )}{b d}\\ &=\frac{\left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))}{b^5 d}-\frac{a \left (a^2+2 b^2\right ) \tan (c+d x)}{b^4 d}+\frac{\left (a^2+2 b^2\right ) \tan ^2(c+d x)}{2 b^3 d}-\frac{a \tan ^3(c+d x)}{3 b^2 d}+\frac{\tan ^4(c+d x)}{4 b d}\\ \end{align*}
Mathematica [A] time = 1.21426, size = 99, normalized size = 0.85 \[ \frac{6 b^2 \left (a^2+b^2\right ) \tan ^2(c+d x)-12 a b \left (a^2+2 b^2\right ) \tan (c+d x)+12 \left (a^2+b^2\right )^2 \log (a+b \tan (c+d x))-4 a b^3 \tan ^3(c+d x)+3 b^4 \sec ^4(c+d x)}{12 b^5 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.08, size = 162, normalized size = 1.4 \begin{align*}{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{4}}{4\,bd}}-{\frac{a \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{3\,{b}^{2}d}}+{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{2}{a}^{2}}{2\,d{b}^{3}}}+{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{2}}{bd}}-{\frac{{a}^{3}\tan \left ( dx+c \right ) }{d{b}^{4}}}-2\,{\frac{a\tan \left ( dx+c \right ) }{{b}^{2}d}}+{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ){a}^{4}}{d{b}^{5}}}+2\,{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ){a}^{2}}{d{b}^{3}}}+{\frac{\ln \left ( a+b\tan \left ( dx+c \right ) \right ) }{bd}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.14714, size = 146, normalized size = 1.26 \begin{align*} \frac{\frac{3 \, b^{3} \tan \left (d x + c\right )^{4} - 4 \, a b^{2} \tan \left (d x + c\right )^{3} + 6 \,{\left (a^{2} b + 2 \, b^{3}\right )} \tan \left (d x + c\right )^{2} - 12 \,{\left (a^{3} + 2 \, a b^{2}\right )} \tan \left (d x + c\right )}{b^{4}} + \frac{12 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left (b \tan \left (d x + c\right ) + a\right )}{b^{5}}}{12 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 2.13068, size = 439, normalized size = 3.78 \begin{align*} \frac{6 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) +{\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - 6 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{4} \log \left (\cos \left (d x + c\right )^{2}\right ) + 3 \, b^{4} + 6 \,{\left (a^{2} b^{2} + b^{4}\right )} \cos \left (d x + c\right )^{2} - 4 \,{\left (a b^{3} \cos \left (d x + c\right ) +{\left (3 \, a^{3} b + 5 \, a b^{3}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{12 \, b^{5} d \cos \left (d x + c\right )^{4}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\sec ^{6}{\left (c + d x \right )}}{a + b \tan{\left (c + d x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.73845, size = 162, normalized size = 1.4 \begin{align*} \frac{\frac{3 \, b^{3} \tan \left (d x + c\right )^{4} - 4 \, a b^{2} \tan \left (d x + c\right )^{3} + 6 \, a^{2} b \tan \left (d x + c\right )^{2} + 12 \, b^{3} \tan \left (d x + c\right )^{2} - 12 \, a^{3} \tan \left (d x + c\right ) - 24 \, a b^{2} \tan \left (d x + c\right )}{b^{4}} + \frac{12 \,{\left (a^{4} + 2 \, a^{2} b^{2} + b^{4}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{5}}}{12 \, d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]